<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>庭审设置</title>
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/easyui/easyui.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/easyui/color.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/easyui/icon.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/form.css'}">
<style type="text/css">
	.zitifont{
		background-color: #FCFCFC;
	}
	.mircoPhoneEnable{
		float:right;
		font-size: 16px;
		color: #6197cc;
	}
	.mircoPhoneDisable{
		float:right;
		font-size: 16px;
		color: #bebebe;
	}
</style>
</head>
<body class="zitifont">
			<div class="col-xs-12">
				<span class="col-xs-8" style="font-size:22px;color:#6197cc">麦克风</span>
			</div>
			&nbsp;<br />
				<div id="mircoPhone">
					#{list items:microPhones,as:"microPhone"}
					   <div id="mirco${microPhone_index}" onclick="openMic('${microPhone_index}','${microPhone?.microcode}')" style="cursor:pointer;position: relative;padding-left: 70px;padding-right: 70px;height: 48px;line-height: 48px; #{if (microPhone_index+1) % 2 == 0} background-color: #e7ecec #{/if}">
							<img style="margin-top: 9px;position: absolute;" src="@{'/public/images/microPhone_pressed.png'}"> 
							<span class="mircoPhoneDisable">${microPhone?.microname}</span>
					   </div>
					#{/list}
				</div>
		<div id="jplayer" class="jp-jplayer"></div>
</body>
<script type="text/javascript" src="@{'/public/javascripts/layout/jquery-1.8.2.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/jquery.easyui.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/easyui-lang-zh_CN.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/Validator.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/common.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/dateFormat.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/layout/jquery.jplayer.js'}"></script>
<script type="text/javascript">
var $Path='${ctxPath}';
    var player;
    var isBroad=99;
    $(function(){
    	player=$("#jplayer").jPlayer({
    		swfPath:"/public/javascripts/flash/jquery.jplayer.swf",
    		solution: "html,flash",
    		supplied: "m4a,mp3,mp4,wav,rtmp"
    	}); 
    })
    function openMic(index,path){
    	if(!player.data("jPlayer").status.paused){
    		player.jPlayer("pause");
    	}
    	var playStatus=player.data("jPlayer").status;
		$("#mirco" + index +" img").attr("src",$Path+'/public/images/microPhone_normal.png');
		var bronum=$("#mirco" + index).siblings();
		bronum.each(function(index,bro){
			var id=bro.id;
			$("#"+id+" img").attr("src",$Path+'/public/images/microPhone_pressed.png');
		})
    	$("#jplayer").jPlayer("setMedia", {
    		m4a:path
		});
		player.jPlayer("play");
    }
    /**
     * 暂停
     */
    function pauseBroad(){
    	player.jPlayer("pause");
    }
</script>
</html>